package frsf.cidisi.exercise.laberinto.search;

import frsf.cidisi.exercise.laberinto.search.util.Entorno;
import frsf.cidisi.faia.agent.Agent;
import frsf.cidisi.faia.agent.Perception;
import frsf.cidisi.faia.environment.Environment;

public class AgentePerception extends Perception {

	//TODO: Setup Statics
    //public static int UNKNOWN_PERCEPTION = -1;   

	//TODO: Setup Sensors
    private Entorno entorno;
	
    public  AgentePerception() {
    	//TODO: Complete Method
    }

    public AgentePerception(Agent agent, Environment environment) {
        super(agent, environment);
        this.initPerception(agent, environment);
    }

    /**
     * This method is used to setup the perception.
     */
    @Override
    public void initPerception(Agent agentIn, Environment environmentIn) {
    	
    	//TODO: Complete Method
        
		//Agente agent = (Agente) agentIn;
		Laberinto environment = (Laberinto) environmentIn;
		EstadoLaberinto environmentState = environment.getEnvironmentState();

		this.entorno = environmentState.getEntorno();
    }

	// The following methods are agent-specific:
    //TODO: Complete this section with the agent-specific methods

	public Entorno getEntorno() {
		return entorno;
	}

	public void setEntorno(Entorno entorno) {
		this.entorno = entorno;
	}

	@Override
	public String toString() {
		return "AgentePerception [Entorno= " + entorno + "]";
	}    
}
